Updated for 2.6.1 by: The Tech Support Team, Pictorius Incorporated
Contents: Splitter.pgs
Splitter Read Me
Needs Prograph Extensions:
The default configuration of your 'Prograph Extensions' folder.
Needs Libraries to Compile:
SCLibrary 2.6
Library 2.6
Description
-----------
This example demonstrates a window with two "panes; the divider between them ( a "Splitter") can be dragged to resize the panes. The file Splitter.pgs contains the Splitter class, and a demo window which
demonstrates how to use it.
Select Run from the Exec menu and the split window will appear.
You may click in and drag the space between the two canvases to change
the division within the window. Clicking within a canvas produces a
message indicating which canvas was clicked in. The canvases share a
single, very simple Draw method. It graphically demonstrates how a split
window might be used to provide two simultaneous, independent views of
the same data ( a text file, for example ). Of course, they could just as
easily have completely different Draw methods. In fact, the objects in the
window need not even be canvases. You might wish to have a Scroll List
and a Scroll Text, for example.
How to Use The Table Class in Your Program
-----------------------------------------
Simply position your display items in the window in their default positions
a few pixels apart. Then add an instance of Splitter to the window. It
be just large enough to cover the space between the items, and should be
behind them ( you can use Send Further to ensure this ). The Click method
of the Splitter will then handle all the dragging and resizing.
Notes:
The Splitter Click method looks for two items called Upper and Lower. If
you wish to use different names, simply change the Click method.
You can use more than one Splitter in a window. This will require a
separate Click method for each Splitter, so that each will drag and resize
the appropriate window items
The Splitter assumes the the canvases have vertical scroll bars, and
in several places adjusts for them by subtracting the constant 15 from
various points and rects. This code may have to be adjusted to suit your
particular situation.
If your window has a Grow and/or a Zoom box, or if you set the size
programatically, you should set the Move with Window and Grow with
Window attributes of your Splitter and the window items associated